package java113.project.base;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
import java113.project.util.SysLogger;
import java113.project.util.DocVsSecurityException;

public class OrderDriver {


    public static void main(String[] args) throws DocVsSecurityException, Exception {

        System.getProperties().setProperty("java.security.policy", "config/mysecurity.policy");
        System.setSecurityManager(new SecurityManager());

        Properties properties = new Properties();

        try {

            properties.load(new FileInputStream("./config/project.properties"));

        } catch(IOException ioe) {

            System.out.println("Can't load the properties file");

            ioe.printStackTrace();

        } catch(Exception e) {

            System.out.println("Problem: " + e);

            e.printStackTrace();

        }

        new SysLogger(properties).init();

        ProcessOrder  p  = new ProcessOrder(properties);
        p.run();
    }
}